/**
 * @author ZCR
 * @create 2025/9/8 22:19
 */
public class Solution9 {
    public boolean isPalindrome(int x) {
        if (x < 0) {
            return false;
        }
        int x2 =0;
        int temp = x;
        while (temp != 0) {
            int digit = temp % 10;
            temp /= 10;
            x2 = 10*x2+digit;
        }
        return x2 == x;
    }
}
